import { base, axiosInstance } from '@/api/config';

//报表管理

const reportList = params => {
  return axiosInstance.get(`${base}/report/list`, {params: params});
}; //列表

const reportExport = params => {
  return axiosInstance.get(`${base}/report/export`,{responseType: 'blob',params: params})
}

const reportRoleName = params => {
  return axiosInstance.get(`${base}/report/rolename` , {params: params})
}

const reportAreaStatics = params => {
  return axiosInstance.get(`${base}/report/areaStatistics`, {params: params})
}

const reportSchoolStatics = params => {
  return axiosInstance.get(`${base}/report/schoolStatistics`, {params: params})
}

const reportAreaStaticsExport = params => {
  return axiosInstance.get(`${base}/report/exportArea`,{responseType: 'blob',params: params})
}

const reportSchoolStaticsExport = params => {
  return axiosInstance.get(`${base}/report/exportSchool`, {responseType: 'blob',params: params})
}

/*报表管理*/
let reportManagement = {

  //综合查询
  comprequery: {
    list: reportList,
    export:reportExport,
    role:reportRoleName,
    areaStatics:reportAreaStatics,
    schoolStatics:reportSchoolStatics,
    areaStaticsExport:reportAreaStaticsExport,
    schoolStaticsExport:reportSchoolStaticsExport
  },
};
export { reportManagement }
